<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:33:"./themes/admin/uplevel/index.html";i:1597202568;s:24:"./themes/admin/base.html";i:1597045036;}*/ ?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>康烯乐</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel="stylesheet" href="__JS__/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="__CSS__/font-awesome.min.css">
    <!--CSS引用-->
    
    <link rel="stylesheet" href="__CSS__/admin.css">
    <!--[if lt IE 9]>
    <script src="__CSS__/html5shiv.min.js"></script>
    <script src="__CSS__/respond.min.js"></script>
    <![endif]-->
</head>
<script src="__JS__/jquery.min.js"></script>
<body>
<div class="layui-layout layui-layout-admin">
    <!--头部-->
    <div class="layui-header header">
        <a href=""><img class="logo" src="__STATIC__/images/admin_logo.png" alt=""></a>
        <ul class="layui-nav" style="position: absolute;top: 0;right: 20px;background: none;">
            <!--<li class="layui-nav-item"><a href="<?php echo url('/'); ?>" target="_blank">前台首页</a></li>-->
            <li class="layui-nav-item"><a href="" data-url="<?php echo url('admin/system/clear'); ?>" id="clear-cache">清除缓存</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;"><?php echo session('admin_name'); ?></a>
                <dl class="layui-nav-child"> <!-- 二级菜单 -->
                    <dd><a href="<?php echo url('admin/change_password/index'); ?>">修改密码</a></dd>
                    <dd><a href="<?php echo url('admin/login/logout'); ?>">退出登录</a></dd>
                </dl>
            </li>
        </ul>
    </div>

    <!--侧边栏-->
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree">
                <li class="layui-nav-item layui-nav-title"><a>管理菜单</a></li>
                <li class="layui-nav-item">
                    <a href="<?php echo url('admin/index/index'); ?>"><i class="fa fa-home"></i> 网站信息</a>
                </li>
                <?php if(is_array($menu) || $menu instanceof \think\Collection || $menu instanceof \think\Paginator): if( count($menu)==0 ) : echo "" ;else: foreach($menu as $key=>$vo): if(isset($vo['children'])): ?>
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="<?php echo $vo['icon']; ?>"></i> <?php echo $vo['title']; ?></a>
                    <dl class="layui-nav-child">
                        <?php if(is_array($vo['children']) || $vo['children'] instanceof \think\Collection || $vo['children'] instanceof \think\Paginator): if( count($vo['children'])==0 ) : echo "" ;else: foreach($vo['children'] as $key=>$v): ?>
                        <dd><a href="<?php echo url($v['name']); ?>"> <?php echo $v['title']; ?></a></dd>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                    </dl>
                </li>
                <?php else: ?>
                <li class="layui-nav-item">
                    <a href="<?php echo url($vo['name']); ?>"><i class="<?php echo $vo['icon']; ?>"></i> <?php echo $vo['title']; ?></a>
                </li>
                <?php endif; endforeach; endif; else: echo "" ;endif; ?>

                <li class="layui-nav-item" style="height: 30px; text-align: center"></li>
            </ul>
        </div>
    </div>

    <!--主体-->
    
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">订单审核</li>
            <!--<li class=""><a href="<?php echo url('admin/uplevel/all'); ?>">历史信息</a></li>-->
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">

                <!--<form class="layui-form layui-form-pane" action="<?php echo url('admin/uplevel/index'); ?>" method="get">-->
                    <!--<div class="layui-inline">-->
                        <!--<label class="layui-form-label">关键词</label>-->
                        <!--<div class="layui-input-inline">-->
                            <!--<input type="text" name="keyword" value="<?php echo $keyword; ?>" placeholder="请输入关键词" class="layui-input">-->
                        <!--</div>-->
                    <!--</div>-->
                    <!--<div class="layui-inline">-->
                        <!--<button class="layui-btn">搜索</button>-->
                    <!--</div>-->
                <!--</form>-->
                <hr>

                <table class="layui-table">
                    <thead>
                    <tr>
                        <th style="width: 30px;">ID</th>
                        <th>用户名</th>
                        <th>手机</th>
                        <th>上级</th>
                        <th>升级前等级</th>
                        <th>金额</th>
                        <th>上传图片</th>
                        <th>上级审核状态</th>
                        <th>平台审核状态</th>
                        <th>申请时间</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php if(is_array($order_list) || $order_list instanceof \think\Collection || $order_list instanceof \think\Paginator): if( count($order_list)==0 ) : echo "" ;else: foreach($order_list as $key=>$vo): ?>
                    <tr>
                        <td><?php echo $vo['id']; ?></td>
                        <td><?php echo $vo['username']; ?></td>
                        <td><?php echo $vo['mobile']; ?></td>
                        <td><?php echo $vo['up_username']; ?></td>
                        <td><?php echo $vo['level']; ?></td>
                        <td><?php echo $vo['money']; ?></td>
                        <td>
                            <?php if(is_array($vo['image']) || $vo['image'] instanceof \think\Collection || $vo['image'] instanceof \think\Paginator): if( count($vo['image'])==0 ) : echo "" ;else: foreach($vo['image'] as $key=>$img): ?>
                            <a href="<?php echo $img_url; ?><?php echo $img; ?>" target="_blank"><img src="<?php echo $img_url; ?><?php echo $img; ?>" style="width: 60px;height: 60px;"></a>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                        </td>
                        <td><?php echo $vo['up_status']==0 ? '待审核' : ($vo['up_status']==1 ? '通过' : '未通过'); ?></td>
                        <td><?php echo $vo['pingtai_status']==0 ? '待审核' : ($vo['pingtai_status']==1 ? '通过' : '未通过'); ?></td>
                        <td><?php echo $vo['add_time']; ?></td>
                        <td>
                            <!--<a href="<?php echo url('admin/user/edit',['id'=>$vo['id']]); ?>" class="layui-btn layui-btn-normal layui-bt0n-mini">编辑</a>-->
                            <?php if($vo['pingtai_status'] == '0'): ?>
                            <!--<a href="<?php echo url('admin/uplevel/审核',['id'=>$vo['id']]); ?>" class="layui-btn layui-btn-normal layui-btn-mini">审核</a>-->

                            <div class="site-demo-button" id="layerDemo" style="margin-bottom: 0;">
                                <button data-method="notice" class="layui-btn layui-btn-danger layui-btn-mini" data-id="<?php echo $vo['id']; ?>">审核</button>
                            </div>
                            <?php endif; ?>
                            <!--<a href="<?php echo url('admin/user/delete',['id'=>$vo['id']]); ?>" class="layui-btn layui-btn-danger layui-btn-mini ajax-delete">删除</a>-->
                        </td>
                    </tr>
                    <?php endforeach; endif; else: echo "" ;endif; ?>
                    </tbody>
                </table>
                <!--分页-->
                <?php echo $order_list->render(); ?>
            </div>
        </div>
    </div>
</div>

<script>
    (function () {
        $('.layui-btn').on('click', function(){
            var id=this.dataset.id;
            layer.open({
                type: 1
                ,title: '审核' //不显示标题栏
                ,closeBtn: 1
                ,area: '300px;'
                ,shade: 0.8
                ,id: 'LAY_layuipro' //设定一个id，防止重复弹出
                ,btn: ['通过', '不通过']
                ,btnAlign: 'c'
                ,moveType: 1 //拖拽模式，0或者1
                //,content: '<div style="padding: 50px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;">你知道吗？亲！<br>layer ≠ layui<br><br>layer只是作为Layui的一个弹层模块，由于其用户基数较大，所以常常会有人以为layui是layerui<br><br>layer虽然已被 Layui 收编为内置的弹层模块，但仍然会作为一个独立组件全力维护、升级。<br><br>我们此后的征途是星辰大海 ^_^</div>'
                ,content: '<div style="padding: 20px; text-align: center">确认审核</div>'


                ,success: function(layero){
                    // var btn = layero.find('.layui-layer-btn');
                    // btn.find('.layui-layer-btn0').attr({
                    //     href: 'http://www.layui.com/'
                    //     ,target: '_blank'
                    // });
                },yes:function (index) {
                    $.post("<?php echo url('admin/uplevel/shenhe'); ?>",{id:id,status:1},function (re) {
                        layer.msg(re.Message);
                        layer.close(index);
                        window.location.reload()
                    },'json')
                },btn2:function () {
                    $.post("<?php echo url('admin/uplevel/shenhe'); ?>",{id:id,status:2},function (re) {
                        layer.msg(re.Message);
                        layer.close(index);
                        window.location.reload()
                    },'json')
                },
            });
        });
    })();
</script>



    <!--底部-->
    <div class="layui-footer footer">
        <div class="layui-main">
            <p>2016-2017 &copy; <a href="https://github.com/xiayulei/open_source_bms" target="_blank">Open Source BMS</a></p>
        </div>
    </div>
</div>

<script>
    // 定义全局JS变量
    var GV = {
        current_controller: "admin/<?php echo (isset($controller) && ($controller !== '')?$controller:''); ?>/",
        base_url: "__STATIC__"
    };
</script>
<!--JS引用-->

<script src="__JS__/layui/lay/dest/layui.all.js"></script>
<script src="__JS__/admin.js"></script>

<!--页面JS脚本-->

</body>
</html>